﻿using AutoMapper;
using System.IO;
using ZGLXM.Domain;
using ZGLXM.Writh.Api.Applicantion.Command.RBAC;
using ZGLXM.Writh.Api.Dtos.Login;

namespace ZGLXM.Writh.Api
{
    public class MappingProfile:Profile
    {
        public MappingProfile()
        {
            CreateMap<UserRoleInsertCommand, User>().ReverseMap();
            CreateMap<UserInsertCommand, User>().ReverseMap();
            CreateMap<UserUpdateCommand, User>().ReverseMap();

            CreateMap<RoleInsertCommand, Role>().ReverseMap();
            CreateMap<RoleUpdateCommand, Role>().ReverseMap();

            CreateMap<ProfessionInsertCommand, Profession>().ReverseMap();
            CreateMap<ProfessionUpdateCommand, Profession>().ReverseMap();


            CreateMap<LoginDTO, User>().ReverseMap();
        }
    }
}
